3.244 \(\int (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \sec ^2(c+d x) \, dx\)
Optimal. Leaf size=195 \[ \frac {a^3 (a B+4 A b) \tanh ^{-1}(\sin (c+d x))}{d}-\frac {b^2 \left (6 a^2 A-8 a b B-3 A b^2\right ) \sin (c+d x) \cos (c+d x)}{6 d}-\frac {b \left (6 a^3 A-17 a^2 b B-12 a A b^2-2 b^3 B\right ) \sin (c+d x)}{3 d}+\frac {1}{2} b x \left (8 a^3 B+12 a^2 A b+4 a b^2 B+A b^3\right )-\frac {b (3 a A-b B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}+\frac {a A \tan (c+d x) (a+b \cos (c+d x))^3}{d} \]
[Out]
1/2*b*(12*A*a^2*b+A*b^3+8*B*a^3+4*B*a*b^2)*x+a^3*(4*A*b+B*a)*arctanh(sin(d*x+c))/d-1/3*b*(6*A*a^3-12*A*a*b^2-1
7*B*a^2*b-2*B*b^3)*sin(d*x+c)/d-1/6*b^2*(6*A*a^2-3*A*b^2-8*B*a*b)*cos(d*x+c)*sin(d*x+c)/d-1/3*b*(3*A*a-B*b)*(a
+b*cos(d*x+c))^2*sin(d*x+c)/d+a*A*(a+b*cos(d*x+c))^3*tan(d*x+c)/d
________________________________________________________________________________________
Rubi [A] time = 0.57, antiderivative size = 195, normalized size of antiderivative = 1.00,
number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used =
{2989, 3049, 3033, 3023, 2735, 3770} \[ -\frac {b \left (6 a^3 A-17 a^2 b B-12 a A b^2-2 b^3 B\right ) \sin (c+d x)}{3 d}-\frac {b^2 \left (6 a^2 A-8 a b B-3 A b^2\right ) \sin (c+d x) \cos (c+d x)}{6 d}+\frac {1}{2} b x \left (12 a^2 A b+8 a^3 B+4 a b^2 B+A b^3\right )+\frac {a^3 (a B+4 A b) \tanh ^{-1}(\sin (c+d x))}{d}-\frac {b (3 a A-b B) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}+\frac {a A \tan (c+d x) (a+b \cos (c+d x))^3}{d} \]
Antiderivative was successfully verified.
[In]
Int[(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x])*Sec[c + d*x]^2,x]
[Out]
(b*(12*a^2*A*b + A*b^3 + 8*a^3*B + 4*a*b^2*B)*x)/2 + (a^3*(4*A*b + a*B)*ArcTanh[Sin[c + d*x]])/d - (b*(6*a^3*A
- 12*a*A*b^2 - 17*a^2*b*B - 2*b^3*B)*Sin[c + d*x])/(3*d) - (b^2*(6*a^2*A - 3*A*b^2 - 8*a*b*B)*Cos[c + d*x]*Si
n[c + d*x])/(6*d) - (b*(3*a*A - b*B)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + (a*A*(a + b*Cos[c + d*x])^3*
Tan[c + d*x])/d
Rule 2735
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]
Rule 2989
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[((b*c - a*d)*(B*c - A*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)
*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(n + 1)*(c^2 - d^2)), x] + Dist[1/(d*(n + 1)*(c^2 - d^2)), Int[(a + b*Sin[
e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1)*Simp[b*(b*c - a*d)*(B*c - A*d)*(m - 1) + a*d*(a*A*c + b*B*c - (
A*b + a*B)*d)*(n + 1) + (b*(b*d*(B*c - A*d) + a*(A*c*d + B*(c^2 - 2*d^2)))*(n + 1) - a*(b*c - a*d)*(B*c - A*d)
*(n + 2))*Sin[e + f*x] + b*(d*(A*b*c + a*B*c - a*A*d)*(m + n + 1) - b*B*(c^2*m + d^2*(n + 1)))*Sin[e + f*x]^2,
x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2,
0] && GtQ[m, 1] && LtQ[n, -1]
Rule 3023
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Rule 3033
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e
_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*d*Cos[e + f*x]*Sin[e + f*x]*(a + b
*Sin[e + f*x])^(m + 1))/(b*f*(m + 3)), x] + Dist[1/(b*(m + 3)), Int[(a + b*Sin[e + f*x])^m*Simp[a*C*d + A*b*c*
(m + 3) + b*(B*c*(m + 3) + d*(C*(m + 2) + A*(m + 3)))*Sin[e + f*x] - (2*a*C*d - b*(c*C + B*d)*(m + 3))*Sin[e +
f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] &&
!LtQ[m, -1]
Rule 3049
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)
*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e +
f*x])^m*(c + d*Sin[e + f*x])^(n + 1))/(d*f*(m + n + 2)), x] + Dist[1/(d*(m + n + 2)), Int[(a + b*Sin[e + f*x]
)^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A*d*(m + n + 2) + C*(b*c*m + a*d*(n + 1)) + (d*(A*b + a*B)*(m + n + 2)
- C*(a*c - b*d*(m + n + 1)))*Sin[e + f*x] + (C*(a*d*m - b*c*(m + 1)) + b*B*d*(m + n + 2))*Sin[e + f*x]^2, x],
x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2
, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Rule 3770
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rubi steps
\begin {align*} \int (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \sec ^2(c+d x) \, dx &=\frac {a A (a+b \cos (c+d x))^3 \tan (c+d x)}{d}+\int (a+b \cos (c+d x))^2 \left (a (4 A b+a B)+b (A b+2 a B) \cos (c+d x)-b (3 a A-b B) \cos ^2(c+d x)\right ) \sec (c+d x) \, dx\\ &=-\frac {b (3 a A-b B) (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {a A (a+b \cos (c+d x))^3 \tan (c+d x)}{d}+\frac {1}{3} \int (a+b \cos (c+d x)) \left (3 a^2 (4 A b+a B)+b \left (9 a A b+9 a^2 B+2 b^2 B\right ) \cos (c+d x)-b \left (6 a^2 A-3 A b^2-8 a b B\right ) \cos ^2(c+d x)\right ) \sec (c+d x) \, dx\\ &=-\frac {b^2 \left (6 a^2 A-3 A b^2-8 a b B\right ) \cos (c+d x) \sin (c+d x)}{6 d}-\frac {b (3 a A-b B) (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {a A (a+b \cos (c+d x))^3 \tan (c+d x)}{d}+\frac {1}{6} \int \left (6 a^3 (4 A b+a B)+3 b \left (12 a^2 A b+A b^3+8 a^3 B+4 a b^2 B\right ) \cos (c+d x)-2 b \left (6 a^3 A-12 a A b^2-17 a^2 b B-2 b^3 B\right ) \cos ^2(c+d x)\right ) \sec (c+d x) \, dx\\ &=-\frac {b \left (6 a^3 A-12 a A b^2-17 a^2 b B-2 b^3 B\right ) \sin (c+d x)}{3 d}-\frac {b^2 \left (6 a^2 A-3 A b^2-8 a b B\right ) \cos (c+d x) \sin (c+d x)}{6 d}-\frac {b (3 a A-b B) (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {a A (a+b \cos (c+d x))^3 \tan (c+d x)}{d}+\frac {1}{6} \int \left (6 a^3 (4 A b+a B)+3 b \left (12 a^2 A b+A b^3+8 a^3 B+4 a b^2 B\right ) \cos (c+d x)\right ) \sec (c+d x) \, dx\\ &=\frac {1}{2} b \left (12 a^2 A b+A b^3+8 a^3 B+4 a b^2 B\right ) x-\frac {b \left (6 a^3 A-12 a A b^2-17 a^2 b B-2 b^3 B\right ) \sin (c+d x)}{3 d}-\frac {b^2 \left (6 a^2 A-3 A b^2-8 a b B\right ) \cos (c+d x) \sin (c+d x)}{6 d}-\frac {b (3 a A-b B) (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {a A (a+b \cos (c+d x))^3 \tan (c+d x)}{d}+\left (a^3 (4 A b+a B)\right ) \int \sec (c+d x) \, dx\\ &=\frac {1}{2} b \left (12 a^2 A b+A b^3+8 a^3 B+4 a b^2 B\right ) x+\frac {a^3 (4 A b+a B) \tanh ^{-1}(\sin (c+d x))}{d}-\frac {b \left (6 a^3 A-12 a A b^2-17 a^2 b B-2 b^3 B\right ) \sin (c+d x)}{3 d}-\frac {b^2 \left (6 a^2 A-3 A b^2-8 a b B\right ) \cos (c+d x) \sin (c+d x)}{6 d}-\frac {b (3 a A-b B) (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {a A (a+b \cos (c+d x))^3 \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.07, size = 257, normalized size = 1.32 \[ \frac {\frac {12 a^4 A \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+\frac {12 a^4 A \sin \left (\frac {1}{2} (c+d x)\right )}{\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )}-12 a^3 (a B+4 A b) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 a^3 (a B+4 A b) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+3 b^2 \left (24 a^2 B+16 a A b+3 b^2 B\right ) \sin (c+d x)+6 b (c+d x) \left (8 a^3 B+12 a^2 A b+4 a b^2 B+A b^3\right )+3 b^3 (4 a B+A b) \sin (2 (c+d x))+b^4 B \sin (3 (c+d x))}{12 d} \]
Antiderivative was successfully verified.
[In]
Integrate[(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x])*Sec[c + d*x]^2,x]
[Out]
(6*b*(12*a^2*A*b + A*b^3 + 8*a^3*B + 4*a*b^2*B)*(c + d*x) - 12*a^3*(4*A*b + a*B)*Log[Cos[(c + d*x)/2] - Sin[(c
+ d*x)/2]] + 12*a^3*(4*A*b + a*B)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + (12*a^4*A*Sin[(c + d*x)/2])/(Cos
[(c + d*x)/2] - Sin[(c + d*x)/2]) + (12*a^4*A*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) + 3*b^2*
(16*a*A*b + 24*a^2*B + 3*b^2*B)*Sin[c + d*x] + 3*b^3*(A*b + 4*a*B)*Sin[2*(c + d*x)] + b^4*B*Sin[3*(c + d*x)])/
(12*d)
________________________________________________________________________________________
fricas [A] time = 1.59, size = 196, normalized size = 1.01 \[ \frac {3 \, {\left (8 \, B a^{3} b + 12 \, A a^{2} b^{2} + 4 \, B a b^{3} + A b^{4}\right )} d x \cos \left (d x + c\right ) + 3 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, B b^{4} \cos \left (d x + c\right )^{3} + 6 \, A a^{4} + 3 \, {\left (4 \, B a b^{3} + A b^{4}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (9 \, B a^{2} b^{2} + 6 \, A a b^{3} + B b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^2,x, algorithm="fricas")
[Out]
1/6*(3*(8*B*a^3*b + 12*A*a^2*b^2 + 4*B*a*b^3 + A*b^4)*d*x*cos(d*x + c) + 3*(B*a^4 + 4*A*a^3*b)*cos(d*x + c)*lo
g(sin(d*x + c) + 1) - 3*(B*a^4 + 4*A*a^3*b)*cos(d*x + c)*log(-sin(d*x + c) + 1) + (2*B*b^4*cos(d*x + c)^3 + 6*
A*a^4 + 3*(4*B*a*b^3 + A*b^4)*cos(d*x + c)^2 + 4*(9*B*a^2*b^2 + 6*A*a*b^3 + B*b^4)*cos(d*x + c))*sin(d*x + c))
/(d*cos(d*x + c))
________________________________________________________________________________________
giac [A] time = 1.23, size = 371, normalized size = 1.90 \[ -\frac {\frac {12 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - 3 \, {\left (8 \, B a^{3} b + 12 \, A a^{2} b^{2} + 4 \, B a b^{3} + A b^{4}\right )} {\left (d x + c\right )} - 6 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + 6 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (36 \, B a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 24 \, A a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, B a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, A b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, B b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 72 \, B a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 48 \, A a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, B b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, B a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 24 \, A a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, B a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^2,x, algorithm="giac")
[Out]
-1/6*(12*A*a^4*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 - 1) - 3*(8*B*a^3*b + 12*A*a^2*b^2 + 4*B*a*b^3 + A
*b^4)*(d*x + c) - 6*(B*a^4 + 4*A*a^3*b)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) + 6*(B*a^4 + 4*A*a^3*b)*log(abs(tan
(1/2*d*x + 1/2*c) - 1)) - 2*(36*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^5 + 24*A*a*b^3*tan(1/2*d*x + 1/2*c)^5 - 12*B*a*
b^3*tan(1/2*d*x + 1/2*c)^5 - 3*A*b^4*tan(1/2*d*x + 1/2*c)^5 + 6*B*b^4*tan(1/2*d*x + 1/2*c)^5 + 72*B*a^2*b^2*ta
n(1/2*d*x + 1/2*c)^3 + 48*A*a*b^3*tan(1/2*d*x + 1/2*c)^3 + 4*B*b^4*tan(1/2*d*x + 1/2*c)^3 + 36*B*a^2*b^2*tan(1
/2*d*x + 1/2*c) + 24*A*a*b^3*tan(1/2*d*x + 1/2*c) + 12*B*a*b^3*tan(1/2*d*x + 1/2*c) + 3*A*b^4*tan(1/2*d*x + 1/
2*c) + 6*B*b^4*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
________________________________________________________________________________________
maple [A] time = 0.13, size = 255, normalized size = 1.31 \[ \frac {A \,a^{4} \tan \left (d x +c \right )}{d}+\frac {a^{4} B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {4 A \,a^{3} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+4 B \,a^{3} b x +\frac {4 B \,a^{3} b c}{d}+6 A \,a^{2} b^{2} x +\frac {6 A \,a^{2} b^{2} c}{d}+\frac {6 B \,a^{2} b^{2} \sin \left (d x +c \right )}{d}+\frac {4 A a \,b^{3} \sin \left (d x +c \right )}{d}+\frac {2 B a \,b^{3} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{d}+2 B a \,b^{3} x +\frac {2 B a \,b^{3} c}{d}+\frac {A \,b^{4} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}+\frac {A \,b^{4} x}{2}+\frac {A \,b^{4} c}{2 d}+\frac {B \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) b^{4}}{3 d}+\frac {2 B \,b^{4} \sin \left (d x +c \right )}{3 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^2,x)
[Out]
1/d*A*a^4*tan(d*x+c)+1/d*a^4*B*ln(sec(d*x+c)+tan(d*x+c))+4/d*A*a^3*b*ln(sec(d*x+c)+tan(d*x+c))+4*B*a^3*b*x+4/d
*B*a^3*b*c+6*A*a^2*b^2*x+6/d*A*a^2*b^2*c+6/d*B*a^2*b^2*sin(d*x+c)+4/d*A*a*b^3*sin(d*x+c)+2/d*B*a*b^3*cos(d*x+c
)*sin(d*x+c)+2*B*a*b^3*x+2/d*B*a*b^3*c+1/2/d*A*b^4*cos(d*x+c)*sin(d*x+c)+1/2*A*b^4*x+1/2/d*A*b^4*c+1/3/d*B*sin
(d*x+c)*cos(d*x+c)^2*b^4+2/3/d*B*b^4*sin(d*x+c)
________________________________________________________________________________________
maxima [A] time = 0.32, size = 197, normalized size = 1.01 \[ \frac {48 \, {\left (d x + c\right )} B a^{3} b + 72 \, {\left (d x + c\right )} A a^{2} b^{2} + 12 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a b^{3} + 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A b^{4} - 4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B b^{4} + 6 \, B a^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 24 \, A a^{3} b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 72 \, B a^{2} b^{2} \sin \left (d x + c\right ) + 48 \, A a b^{3} \sin \left (d x + c\right ) + 12 \, A a^{4} \tan \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*cos(d*x+c))^4*(A+B*cos(d*x+c))*sec(d*x+c)^2,x, algorithm="maxima")
[Out]
1/12*(48*(d*x + c)*B*a^3*b + 72*(d*x + c)*A*a^2*b^2 + 12*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*a*b^3 + 3*(2*d*x +
2*c + sin(2*d*x + 2*c))*A*b^4 - 4*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*b^4 + 6*B*a^4*(log(sin(d*x + c) + 1) -
log(sin(d*x + c) - 1)) + 24*A*a^3*b*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 72*B*a^2*b^2*sin(d*x + c
) + 48*A*a*b^3*sin(d*x + c) + 12*A*a^4*tan(d*x + c))/d
________________________________________________________________________________________
mupad [B] time = 2.27, size = 2522, normalized size = 12.93 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(((A + B*cos(c + d*x))*(a + b*cos(c + d*x))^4)/cos(c + d*x)^2,x)
[Out]
(tan(c/2 + (d*x)/2)*(2*A*a^4 + A*b^4 + 2*B*b^4 + 12*B*a^2*b^2 + 8*A*a*b^3 + 4*B*a*b^3) + tan(c/2 + (d*x)/2)^7*
(2*A*a^4 + A*b^4 - 2*B*b^4 - 12*B*a^2*b^2 - 8*A*a*b^3 + 4*B*a*b^3) + tan(c/2 + (d*x)/2)^3*(6*A*a^4 - A*b^4 - (
2*B*b^4)/3 + 12*B*a^2*b^2 + 8*A*a*b^3 - 4*B*a*b^3) - tan(c/2 + (d*x)/2)^5*(A*b^4 - 6*A*a^4 - (2*B*b^4)/3 + 12*
B*a^2*b^2 + 8*A*a*b^3 + 4*B*a*b^3))/(d*(2*tan(c/2 + (d*x)/2)^2 - 2*tan(c/2 + (d*x)/2)^6 - tan(c/2 + (d*x)/2)^8
+ 1)) - (atan(((B*a^4 + 4*A*a^3*b)*((B*a^4 + 4*A*a^3*b)*(16*A*b^4 + 32*B*a^4 + 192*A*a^2*b^2 + 128*A*a^3*b +
64*B*a*b^3 + 128*B*a^3*b) + tan(c/2 + (d*x)/2)*(8*A^2*b^8 + 32*B^2*a^8 + 192*A^2*a^2*b^6 + 1152*A^2*a^4*b^4 +
512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4*b^4 + 512*B^2*a^6*b^2 + 64*A*B*a*b^7 + 256*A*B*a^7*b + 896*A*B
*a^3*b^5 + 1536*A*B*a^5*b^3))*1i - (B*a^4 + 4*A*a^3*b)*((B*a^4 + 4*A*a^3*b)*(16*A*b^4 + 32*B*a^4 + 192*A*a^2*b
^2 + 128*A*a^3*b + 64*B*a*b^3 + 128*B*a^3*b) - tan(c/2 + (d*x)/2)*(8*A^2*b^8 + 32*B^2*a^8 + 192*A^2*a^2*b^6 +
1152*A^2*a^4*b^4 + 512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4*b^4 + 512*B^2*a^6*b^2 + 64*A*B*a*b^7 + 256*
A*B*a^7*b + 896*A*B*a^3*b^5 + 1536*A*B*a^5*b^3))*1i)/((B*a^4 + 4*A*a^3*b)*((B*a^4 + 4*A*a^3*b)*(16*A*b^4 + 32*
B*a^4 + 192*A*a^2*b^2 + 128*A*a^3*b + 64*B*a*b^3 + 128*B*a^3*b) + tan(c/2 + (d*x)/2)*(8*A^2*b^8 + 32*B^2*a^8 +
192*A^2*a^2*b^6 + 1152*A^2*a^4*b^4 + 512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4*b^4 + 512*B^2*a^6*b^2 +
64*A*B*a*b^7 + 256*A*B*a^7*b + 896*A*B*a^3*b^5 + 1536*A*B*a^5*b^3)) + (B*a^4 + 4*A*a^3*b)*((B*a^4 + 4*A*a^3*b)
*(16*A*b^4 + 32*B*a^4 + 192*A*a^2*b^2 + 128*A*a^3*b + 64*B*a*b^3 + 128*B*a^3*b) - tan(c/2 + (d*x)/2)*(8*A^2*b^
8 + 32*B^2*a^8 + 192*A^2*a^2*b^6 + 1152*A^2*a^4*b^4 + 512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4*b^4 + 51
2*B^2*a^6*b^2 + 64*A*B*a*b^7 + 256*A*B*a^7*b + 896*A*B*a^3*b^5 + 1536*A*B*a^5*b^3)) - 256*B^3*a^11*b + 64*A^3*
a^3*b^9 + 1536*A^3*a^5*b^7 - 512*A^3*a^6*b^6 + 9216*A^3*a^7*b^5 - 6144*A^3*a^8*b^4 + 256*B^3*a^6*b^6 + 1024*B^
3*a^8*b^4 - 128*B^3*a^9*b^3 + 1024*B^3*a^10*b^2 + 1152*A*B^2*a^5*b^7 + 5888*A*B^2*a^7*b^5 - 1056*A*B^2*a^8*b^4
+ 7168*A*B^2*a^9*b^3 - 2432*A*B^2*a^10*b^2 + 528*A^2*B*a^4*b^8 + 7552*A^2*B*a^6*b^6 - 2304*A^2*B*a^7*b^5 + 14
592*A^2*B*a^8*b^4 - 7168*A^2*B*a^9*b^3))*(B*a^4*2i + A*a^3*b*8i))/d - (b*atan(((b*(tan(c/2 + (d*x)/2)*(8*A^2*b
^8 + 32*B^2*a^8 + 192*A^2*a^2*b^6 + 1152*A^2*a^4*b^4 + 512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4*b^4 + 5
12*B^2*a^6*b^2 + 64*A*B*a*b^7 + 256*A*B*a^7*b + 896*A*B*a^3*b^5 + 1536*A*B*a^5*b^3) - (b*(A*b^3 + 8*B*a^3 + 12
*A*a^2*b + 4*B*a*b^2)*(16*A*b^4 + 32*B*a^4 + 192*A*a^2*b^2 + 128*A*a^3*b + 64*B*a*b^3 + 128*B*a^3*b)*1i)/2)*(A
*b^3 + 8*B*a^3 + 12*A*a^2*b + 4*B*a*b^2))/2 + (b*(tan(c/2 + (d*x)/2)*(8*A^2*b^8 + 32*B^2*a^8 + 192*A^2*a^2*b^6
+ 1152*A^2*a^4*b^4 + 512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4*b^4 + 512*B^2*a^6*b^2 + 64*A*B*a*b^7 + 2
56*A*B*a^7*b + 896*A*B*a^3*b^5 + 1536*A*B*a^5*b^3) + (b*(A*b^3 + 8*B*a^3 + 12*A*a^2*b + 4*B*a*b^2)*(16*A*b^4 +
32*B*a^4 + 192*A*a^2*b^2 + 128*A*a^3*b + 64*B*a*b^3 + 128*B*a^3*b)*1i)/2)*(A*b^3 + 8*B*a^3 + 12*A*a^2*b + 4*B
*a*b^2))/2)/(64*A^3*a^3*b^9 - 256*B^3*a^11*b + 1536*A^3*a^5*b^7 - 512*A^3*a^6*b^6 + 9216*A^3*a^7*b^5 - 6144*A^
3*a^8*b^4 + 256*B^3*a^6*b^6 + 1024*B^3*a^8*b^4 - 128*B^3*a^9*b^3 + 1024*B^3*a^10*b^2 - (b*(tan(c/2 + (d*x)/2)*
(8*A^2*b^8 + 32*B^2*a^8 + 192*A^2*a^2*b^6 + 1152*A^2*a^4*b^4 + 512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4
*b^4 + 512*B^2*a^6*b^2 + 64*A*B*a*b^7 + 256*A*B*a^7*b + 896*A*B*a^3*b^5 + 1536*A*B*a^5*b^3) - (b*(A*b^3 + 8*B*
a^3 + 12*A*a^2*b + 4*B*a*b^2)*(16*A*b^4 + 32*B*a^4 + 192*A*a^2*b^2 + 128*A*a^3*b + 64*B*a*b^3 + 128*B*a^3*b)*1
i)/2)*(A*b^3 + 8*B*a^3 + 12*A*a^2*b + 4*B*a*b^2)*1i)/2 + (b*(tan(c/2 + (d*x)/2)*(8*A^2*b^8 + 32*B^2*a^8 + 192*
A^2*a^2*b^6 + 1152*A^2*a^4*b^4 + 512*A^2*a^6*b^2 + 128*B^2*a^2*b^6 + 512*B^2*a^4*b^4 + 512*B^2*a^6*b^2 + 64*A*
B*a*b^7 + 256*A*B*a^7*b + 896*A*B*a^3*b^5 + 1536*A*B*a^5*b^3) + (b*(A*b^3 + 8*B*a^3 + 12*A*a^2*b + 4*B*a*b^2)*
(16*A*b^4 + 32*B*a^4 + 192*A*a^2*b^2 + 128*A*a^3*b + 64*B*a*b^3 + 128*B*a^3*b)*1i)/2)*(A*b^3 + 8*B*a^3 + 12*A*
a^2*b + 4*B*a*b^2)*1i)/2 + 1152*A*B^2*a^5*b^7 + 5888*A*B^2*a^7*b^5 - 1056*A*B^2*a^8*b^4 + 7168*A*B^2*a^9*b^3 -
2432*A*B^2*a^10*b^2 + 528*A^2*B*a^4*b^8 + 7552*A^2*B*a^6*b^6 - 2304*A^2*B*a^7*b^5 + 14592*A^2*B*a^8*b^4 - 716
8*A^2*B*a^9*b^3))*(A*b^3 + 8*B*a^3 + 12*A*a^2*b + 4*B*a*b^2))/d
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*cos(d*x+c))**4*(A+B*cos(d*x+c))*sec(d*x+c)**2,x)
[Out]
Timed out
________________________________________________________________________________________